package com.gistmap.dto;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


/**
 * Created by Administrator on 2017/4/14.
 */
public class CommentDto {
    private int id;
    private int pid;
    private String name;
    private String avatar;
    private String reply;
    private int type;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    private String createTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getReply() {
        return reply;
    }

    public void setReply(String reply) {
        this.reply = reply;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String  createTime) {
        this.createTime = createTime.substring(0,createTime.length()-2);
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "CommentDto{" +
                "id=" + id +
                ", pid=" + pid +
                ", name='" + name + '\'' +
                ", avatar='" + avatar + '\'' +
                ", reply='" + reply + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
